﻿using System;

namespace ExFlash.Records
{
    public class MorphGradient : ISwfSerializable
    {
        public Byte NumGradients
        {
            get;
            protected set;
        }

        public MorphGradRecord[] GradientRecords
        {
            get;
            protected set;
        }

        #region ISwfSerializable Members

        public void SwfDeserialize(BinaryBitReader reader)
        {
            NumGradients = reader.ReadByte();

            GradientRecords = new MorphGradRecord[NumGradients];

            for (int i = 0; i < NumGradients; i++)
            {
                GradientRecords[i] = new MorphGradRecord();
                GradientRecords[i].SwfDeserialize(reader);
            }
        }

        public void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
